#ifndef __WHIMSY_NETWORK_DEFINES_HPP__SHANHAOBO_19800429__
#define __WHIMSY_NETWORK_DEFINES_HPP__SHANHAOBO_19800429__

#include "./WhimsyNetworkConfig.hpp"

namespace Whms
{
    namespace Network
    {
        namespace RawPacket
        {
            /// MTU
            /// IP              65535
            /// IEEE 802.3      8166
            /// IEEE 802.4      4464
            /// IEEE 802.5      1492
            /// PPPoE           1492
            /// X.25            576
            static ::Whms::Size::TypeConst  MaxSize = 576;

            struct Type
            {
                typedef ::Whms::Byte::Type tBuffer[::Whms::Network::RawPacket::MaxSize];

                tBuffer             m_Buffer;
                ::Whms::Size::Type  m_UsedSz;
            }; /// end of struct Type

            WIZ_DECLARE(::Whms::Network::RawPacket::Type);
        } /// end of namespace RawPacket

        namespace Packet
        {
            struct Type : public ::Whms::Network::RawPacket::Type
            {
                ::Whms::Index::Type     m_ReliableIndex;
                ::Whms::Bool::Type      m_Reliable;
            }; /// end of struct Type

            WIZ_DECLARE(::Whms::Network::Packet::Type);
        } /// end of namespace Packet

        namespace RecvResult
        {
            enum Type
            {
                eRR_Success,
                eRR_Error
            };
            WIZ_DECLARE(::Whms::Network::RecvResult::Type);
        } /// end of namespace RecvResult

        namespace Parcel
        {
            static ::Whms::Size::TypeConst  MaxSize = 512;

            struct Type
            {
                typedef ::Whms::Byte::Type tBuffer[::Whms::Network::Parcel::MaxSize];

                tBuffer                 m_Buffer;

                ::Whms::Index::Type     m_ChannelIndex;
            };
            WIZ_DECLARE(::Whms::Network::Parcel::Type);

            WIZ_DECLARE_ARRAY(::Whms::Network::Parcel::Type);
        } /// end of namespace Parcel
    } /// end of namespace Network
} /// end of namespace Whms

#endif /*__WHIMSY_NETWORK_DEFINES_HPP__SHANHAOBO_19800429__*/
